<template>
  <div class="login">
    <div class="card-left">
      <p>用前须知: adjfahlfhalfhdalsdjfaslf</p>
    </div>
    <div class="card-right">
      <div class="title">Login</div>
      <!-- 输入框(用户名) -->
      <div class="box-input">
        <div class="border">
          <input type="text" name="text" class="input" placeholder="Username" />
        </div>
      </div>
      <!-- 密码(密码) -->
      <div class="box-input">
        <div class="border">
          <input type="text" name="text" class="input" placeholder="Password" />
        </div>
      </div>

      <!-- 登录按钮 -->
      <button class="login-btn" type="button">
        <strong>PLAY</strong>
        <div id="container-stars">
          <div id="stars"></div>
        </div>

        <div id="glow">
          <div class="circle"></div>
          <div class="circle"></div>
        </div>
      </button>
    </div>
  </div>
</template>

<script>
export default {};
</script>

<style scoped>
.login {
  width: 900px;
  height: 500px;
  margin: 40px auto;
  display: flex;
  justify-content: center;
}

.login .card-left {
  width: 400px;
  height: 500px;
  margin: 0 10px;
  padding: 30px;
  border-radius: 30px;
  background: #212121;
  box-shadow: 15px 15px 30px rgb(25, 25, 25), -15px -15px 30px rgb(60, 60, 60);
}

.login .card-right {
  width: 500px;
  height: 500px;
  margin: 0 10px;
  padding: 80px;
  border-radius: 30px;
  background: #212121;
  box-shadow: 15px 15px 30px rgb(25, 25, 25), -15px -15px 30px rgb(60, 60, 60);
}

.title {
  width: 200px;
  margin: 10px auto;
  font-size: 50px;
  font-weight: 600;
  text-align: center;
}

/* -------------------输入框---------------- */
.box-input {
  width: 255px;
  margin: 30px auto;
  position: relative;
}

.border {
  background-image: linear-gradient(
    to right bottom,
    #e300ff,
    #ff00aa,
    #ff5956,
    #ffb900,
    #fffe00
  );
  box-shadow: -25px -10px 30px -5px rgba(225, 0, 255, 0.5),
    25px -10px 30px -5px rgba(255, 0, 212, 0.5),
    25px 10px 30px -5px rgba(255, 174, 0, 0.5),
    -25px 10px 30px -5px rgba(255, 230, 0, 0.5);
  padding: 4px;
}

.input {
  background-color: #212121;
  max-width: 250px;
  height: 40px;
  padding: 0 19px 0 10px;
  font-size: 1.1em;
  position: relative;
  border: none;
  color: white;
  outline: 0;
  overflow: hidden;
}

.box-input::after,
.box-input::before {
  content: "";
  width: 130px;
  height: 30px;
  position: absolute;
  z-index: -1;
}

.box-input::after {
  bottom: 0;
  right: 0;
}

.box-input::before {
  top: 0;
  left: 0;
}

.input::placeholder {
  transition: all 0.5s ease-in, transform 0.2s ease-in 0.6s;
}

.input:focus::placeholder {
  padding-left: 165px;
  transform: translateY(-50px);
}

/* ----------------------------------- */

/* ---------------登录按钮------------------ */
.login-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 13rem;
  overflow: hidden;
  height: 3rem;
  background-size: 300% 300%;
  backdrop-filter: blur(1rem);
  border-radius: 5rem;
  transition: 0.5s;
  animation: gradient_301 5s ease infinite;
  border: double 4px transparent;
  background-image: linear-gradient(#212121, #212121),
    linear-gradient(
      137.48deg,
      #ffdb3b 10%,
      #fe53bb 45%,
      #8f51ea 67%,
      #0044ff 87%
    );
  background-origin: border-box;
  background-clip: content-box, border-box;
  margin: 0 auto;
}

#container-stars {
  position: absolute;
  z-index: -1;
  width: 100%;
  height: 100%;
  overflow: hidden;
  transition: 0.5s;
  backdrop-filter: blur(1rem);
  border-radius: 5rem;
}

strong {
  z-index: 2;
  font-family: "Avalors Personal Use";
  font-size: 12px;
  letter-spacing: 5px;
  color: #ffffff;
  text-shadow: 0 0 4px white;
}

#glow {
  position: absolute;
  display: flex;
  width: 12rem;
}

.circle {
  width: 100%;
  height: 30px;
  filter: blur(2rem);
  animation: pulse_3011 4s infinite;
  z-index: -1;
}

.circle:nth-of-type(1) {
  background: rgba(254, 83, 186, 0.636);
}

.circle:nth-of-type(2) {
  background: rgba(142, 81, 234, 0.704);
}

.login-btn:hover #container-stars {
  z-index: 1;
  background-color: #212121;
}

.login-btn:hover {
  transform: scale(1.1);
}

.login-btn:active {
  border: double 4px #fe53bb;
  background-origin: border-box;
  background-clip: content-box, border-box;
  animation: none;
}

.login-btn:active .circle {
  background: #fe53bb;
}

#stars {
  position: relative;
  background: transparent;
  width: 200rem;
  height: 200rem;
}

#stars::after {
  content: "";
  position: absolute;
  top: -10rem;
  left: -100rem;
  width: 100%;
  height: 100%;
  animation: animStarRotate 90s linear infinite;
}

#stars::after {
  background-image: radial-gradient(#ffffff 1px, transparent 1%);
  background-size: 50px 50px;
}

#stars::before {
  content: "";
  position: absolute;
  top: 0;
  left: -50%;
  width: 170%;
  height: 500%;
  animation: animStar 60s linear infinite;
}

#stars::before {
  background-image: radial-gradient(#ffffff 1px, transparent 1%);
  background-size: 50px 50px;
  opacity: 0.5;
}

@keyframes animStar {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-135rem);
  }
}

@keyframes animStarRotate {
  from {
    transform: rotate(360deg);
  }

  to {
    transform: rotate(0);
  }
}

@keyframes gradient_301 {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

@keyframes pulse_3011 {
  0% {
    transform: scale(0.75);
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(0, 0, 0, 0);
  }

  100% {
    transform: scale(0.75);
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
  }
}

/* ----------------------------------- */
</style>